<?php


/**
 * Base class that represents a query for the 'view_rejections' table.
 *
 *
 *
 * @method EmpevalViewRejectionsQuery orderByBonusGoalsFormId($order = Criteria::ASC) Order by the bonus_goals_form_id column
 * @method EmpevalViewRejectionsQuery orderByText($order = Criteria::ASC) Order by the text column
 * @method EmpevalViewRejectionsQuery orderByDecision($order = Criteria::ASC) Order by the decision column
 * @method EmpevalViewRejectionsQuery orderByStatus($order = Criteria::ASC) Order by the status column
 * @method EmpevalViewRejectionsQuery orderByFname($order = Criteria::ASC) Order by the fname column
 * @method EmpevalViewRejectionsQuery orderByLname($order = Criteria::ASC) Order by the lname column
 * @method EmpevalViewRejectionsQuery orderBySuperiorFname($order = Criteria::ASC) Order by the superior_fname column
 * @method EmpevalViewRejectionsQuery orderBySuperiorLname($order = Criteria::ASC) Order by the superior_lname column
 * @method EmpevalViewRejectionsQuery orderByPositionNamePl($order = Criteria::ASC) Order by the position_name_pl column
 * @method EmpevalViewRejectionsQuery orderByPositionNameEn($order = Criteria::ASC) Order by the position_name_en column
 * @method EmpevalViewRejectionsQuery orderByUnitNamePl($order = Criteria::ASC) Order by the unit_name_pl column
 * @method EmpevalViewRejectionsQuery orderByUnitNameEn($order = Criteria::ASC) Order by the unit_name_en column
 * @method EmpevalViewRejectionsQuery orderByLastModified($order = Criteria::ASC) Order by the last_modified column
 * @method EmpevalViewRejectionsQuery orderByCreated($order = Criteria::ASC) Order by the created column
 * @method EmpevalViewRejectionsQuery orderByActive($order = Criteria::ASC) Order by the active column
 *
 * @method EmpevalViewRejectionsQuery groupByBonusGoalsFormId() Group by the bonus_goals_form_id column
 * @method EmpevalViewRejectionsQuery groupByText() Group by the text column
 * @method EmpevalViewRejectionsQuery groupByDecision() Group by the decision column
 * @method EmpevalViewRejectionsQuery groupByStatus() Group by the status column
 * @method EmpevalViewRejectionsQuery groupByFname() Group by the fname column
 * @method EmpevalViewRejectionsQuery groupByLname() Group by the lname column
 * @method EmpevalViewRejectionsQuery groupBySuperiorFname() Group by the superior_fname column
 * @method EmpevalViewRejectionsQuery groupBySuperiorLname() Group by the superior_lname column
 * @method EmpevalViewRejectionsQuery groupByPositionNamePl() Group by the position_name_pl column
 * @method EmpevalViewRejectionsQuery groupByPositionNameEn() Group by the position_name_en column
 * @method EmpevalViewRejectionsQuery groupByUnitNamePl() Group by the unit_name_pl column
 * @method EmpevalViewRejectionsQuery groupByUnitNameEn() Group by the unit_name_en column
 * @method EmpevalViewRejectionsQuery groupByLastModified() Group by the last_modified column
 * @method EmpevalViewRejectionsQuery groupByCreated() Group by the created column
 * @method EmpevalViewRejectionsQuery groupByActive() Group by the active column
 *
 * @method EmpevalViewRejectionsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 * @method EmpevalViewRejectionsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 * @method EmpevalViewRejectionsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 *
 * @method EmpevalViewRejections findOne(PropelPDO $con = null) Return the first EmpevalViewRejections matching the query
 * @method EmpevalViewRejections findOneOrCreate(PropelPDO $con = null) Return the first EmpevalViewRejections matching the query, or a new EmpevalViewRejections object populated from the query conditions when no match is found
 *
 * @method EmpevalViewRejections findOneByBonusGoalsFormId(int $bonus_goals_form_id) Return the first EmpevalViewRejections filtered by the bonus_goals_form_id column
 * @method EmpevalViewRejections findOneByText(string $text) Return the first EmpevalViewRejections filtered by the text column
 * @method EmpevalViewRejections findOneByDecision(string $decision) Return the first EmpevalViewRejections filtered by the decision column
 * @method EmpevalViewRejections findOneByStatus(int $status) Return the first EmpevalViewRejections filtered by the status column
 * @method EmpevalViewRejections findOneByFname(string $fname) Return the first EmpevalViewRejections filtered by the fname column
 * @method EmpevalViewRejections findOneByLname(string $lname) Return the first EmpevalViewRejections filtered by the lname column
 * @method EmpevalViewRejections findOneBySuperiorFname(string $superior_fname) Return the first EmpevalViewRejections filtered by the superior_fname column
 * @method EmpevalViewRejections findOneBySuperiorLname(string $superior_lname) Return the first EmpevalViewRejections filtered by the superior_lname column
 * @method EmpevalViewRejections findOneByPositionNamePl(string $position_name_pl) Return the first EmpevalViewRejections filtered by the position_name_pl column
 * @method EmpevalViewRejections findOneByPositionNameEn(string $position_name_en) Return the first EmpevalViewRejections filtered by the position_name_en column
 * @method EmpevalViewRejections findOneByUnitNamePl(string $unit_name_pl) Return the first EmpevalViewRejections filtered by the unit_name_pl column
 * @method EmpevalViewRejections findOneByUnitNameEn(string $unit_name_en) Return the first EmpevalViewRejections filtered by the unit_name_en column
 * @method EmpevalViewRejections findOneByLastModified(string $last_modified) Return the first EmpevalViewRejections filtered by the last_modified column
 * @method EmpevalViewRejections findOneByCreated(string $created) Return the first EmpevalViewRejections filtered by the created column
 * @method EmpevalViewRejections findOneByActive(boolean $active) Return the first EmpevalViewRejections filtered by the active column
 *
 * @method array findByBonusGoalsFormId(int $bonus_goals_form_id) Return EmpevalViewRejections objects filtered by the bonus_goals_form_id column
 * @method array findByText(string $text) Return EmpevalViewRejections objects filtered by the text column
 * @method array findByDecision(string $decision) Return EmpevalViewRejections objects filtered by the decision column
 * @method array findByStatus(int $status) Return EmpevalViewRejections objects filtered by the status column
 * @method array findByFname(string $fname) Return EmpevalViewRejections objects filtered by the fname column
 * @method array findByLname(string $lname) Return EmpevalViewRejections objects filtered by the lname column
 * @method array findBySuperiorFname(string $superior_fname) Return EmpevalViewRejections objects filtered by the superior_fname column
 * @method array findBySuperiorLname(string $superior_lname) Return EmpevalViewRejections objects filtered by the superior_lname column
 * @method array findByPositionNamePl(string $position_name_pl) Return EmpevalViewRejections objects filtered by the position_name_pl column
 * @method array findByPositionNameEn(string $position_name_en) Return EmpevalViewRejections objects filtered by the position_name_en column
 * @method array findByUnitNamePl(string $unit_name_pl) Return EmpevalViewRejections objects filtered by the unit_name_pl column
 * @method array findByUnitNameEn(string $unit_name_en) Return EmpevalViewRejections objects filtered by the unit_name_en column
 * @method array findByLastModified(string $last_modified) Return EmpevalViewRejections objects filtered by the last_modified column
 * @method array findByCreated(string $created) Return EmpevalViewRejections objects filtered by the created column
 * @method array findByActive(boolean $active) Return EmpevalViewRejections objects filtered by the active column
 *
 * @package    propel.generator.empeval.om
 */
abstract class EmpevalBaseViewRejectionsQuery extends ModelCriteria
{
    /**
     * Initializes internal state of EmpevalBaseViewRejectionsQuery object.
     *
     * @param     string $dbName The dabase name
     * @param     string $modelName The phpName of a model, e.g. 'Book'
     * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
     */
    public function __construct($dbName = 'vgp_empeval', $modelName = 'EmpevalViewRejections', $modelAlias = null)
    {
        parent::__construct($dbName, $modelName, $modelAlias);
    }

    /**
     * Returns a new EmpevalViewRejectionsQuery object.
     *
     * @param     string $modelAlias The alias of a model in the query
     * @param     EmpevalViewRejectionsQuery|Criteria $criteria Optional Criteria to build the query from
     *
     * @return EmpevalViewRejectionsQuery
     */
    public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof EmpevalViewRejectionsQuery) {
            return $criteria;
        }
        $query = new EmpevalViewRejectionsQuery();
        if (null !== $modelAlias) {
            $query->setModelAlias($modelAlias);
        }
        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }

    /**
     * Find object by primary key.
     * Propel uses the instance pool to skip the database if the object exists.
     * Go fast if the query is untouched.
     *
     * <code>
     * $obj  = $c->findPk(12, $con);
     * </code>
     *
     * @param mixed $key Primary key to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return   EmpevalViewRejections|EmpevalViewRejections[]|mixed the result, formatted by the current formatter
     */
    public function findPk($key, $con = null)
    {
        if ($key === null) {
            return null;
        }
        if ((null !== ($obj = EmpevalViewRejectionsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
            // the object is alredy in the instance pool
            return $obj;
        }
        if ($con === null) {
            $con = Propel::getConnection(EmpevalViewRejectionsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
         || $this->map || $this->having || $this->joins) {
            return $this->findPkComplex($key, $con);
        } else {
            return $this->findPkSimple($key, $con);
        }
    }

    /**
     * Find object by primary key using raw SQL to go fast.
     * Bypass doSelect() and the object formatter by using generated code.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return   EmpevalViewRejections A model object, or null if the key is not found
     * @throws   PropelException
     */
    protected function findPkSimple($key, $con)
    {
        $sql = 'SELECT BONUS_GOALS_FORM_ID, TEXT, DECISION, STATUS, FNAME, LNAME, SUPERIOR_FNAME, SUPERIOR_LNAME, POSITION_NAME_PL, POSITION_NAME_EN, UNIT_NAME_PL, UNIT_NAME_EN, LAST_MODIFIED, CREATED, ACTIVE FROM view_rejections WHERE BONUS_GOALS_FORM_ID = :p0';
        try {
            $stmt = $con->prepare($sql);
            $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
        }
        $obj = null;
        if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
            $obj = new EmpevalViewRejections();
            $obj->hydrate($row);
            EmpevalViewRejectionsPeer::addInstanceToPool($obj, (string) $key);
        }
        $stmt->closeCursor();

        return $obj;
    }

    /**
     * Find object by primary key.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return EmpevalViewRejections|EmpevalViewRejections[]|mixed the result, formatted by the current formatter
     */
    protected function findPkComplex($key, $con)
    {
        // As the query uses a PK condition, no limit(1) is necessary.
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKey($key)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
    }

    /**
     * Find objects by primary key
     * <code>
     * $objs = $c->findPks(array(12, 56, 832), $con);
     * </code>
     * @param     array $keys Primary keys to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return PropelObjectCollection|EmpevalViewRejections[]|mixed the list of results, formatted by the current formatter
     */
    public function findPks($keys, $con = null)
    {
        if ($con === null) {
            $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKeys($keys)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->format($stmt);
    }

    /**
     * Filter the query by primary key
     *
     * @param     mixed $key Primary key to use for the query
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByPrimaryKey($key)
    {

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::BONUS_GOALS_FORM_ID, $key, Criteria::EQUAL);
    }

    /**
     * Filter the query by a list of primary keys
     *
     * @param     array $keys The list of primary key to use for the query
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByPrimaryKeys($keys)
    {

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::BONUS_GOALS_FORM_ID, $keys, Criteria::IN);
    }

    /**
     * Filter the query on the bonus_goals_form_id column
     *
     * Example usage:
     * <code>
     * $query->filterByBonusGoalsFormId(1234); // WHERE bonus_goals_form_id = 1234
     * $query->filterByBonusGoalsFormId(array(12, 34)); // WHERE bonus_goals_form_id IN (12, 34)
     * $query->filterByBonusGoalsFormId(array('min' => 12)); // WHERE bonus_goals_form_id > 12
     * </code>
     *
     * @param     mixed $bonusGoalsFormId The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByBonusGoalsFormId($bonusGoalsFormId = null, $comparison = null)
    {
        if (is_array($bonusGoalsFormId) && null === $comparison) {
            $comparison = Criteria::IN;
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::BONUS_GOALS_FORM_ID, $bonusGoalsFormId, $comparison);
    }

    /**
     * Filter the query on the text column
     *
     * Example usage:
     * <code>
     * $query->filterByText('fooValue');   // WHERE text = 'fooValue'
     * $query->filterByText('%fooValue%'); // WHERE text LIKE '%fooValue%'
     * </code>
     *
     * @param     string $text The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByText($text = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($text)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $text)) {
                $text = str_replace('*', '%', $text);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::TEXT, $text, $comparison);
    }

    /**
     * Filter the query on the decision column
     *
     * Example usage:
     * <code>
     * $query->filterByDecision('fooValue');   // WHERE decision = 'fooValue'
     * $query->filterByDecision('%fooValue%'); // WHERE decision LIKE '%fooValue%'
     * </code>
     *
     * @param     string $decision The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByDecision($decision = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($decision)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $decision)) {
                $decision = str_replace('*', '%', $decision);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::DECISION, $decision, $comparison);
    }

    /**
     * Filter the query on the status column
     *
     * Example usage:
     * <code>
     * $query->filterByStatus(1234); // WHERE status = 1234
     * $query->filterByStatus(array(12, 34)); // WHERE status IN (12, 34)
     * $query->filterByStatus(array('min' => 12)); // WHERE status > 12
     * </code>
     *
     * @param     mixed $status The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByStatus($status = null, $comparison = null)
    {
        if (is_array($status)) {
            $useMinMax = false;
            if (isset($status['min'])) {
                $this->addUsingAlias(EmpevalViewRejectionsPeer::STATUS, $status['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($status['max'])) {
                $this->addUsingAlias(EmpevalViewRejectionsPeer::STATUS, $status['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::STATUS, $status, $comparison);
    }

    /**
     * Filter the query on the fname column
     *
     * Example usage:
     * <code>
     * $query->filterByFname('fooValue');   // WHERE fname = 'fooValue'
     * $query->filterByFname('%fooValue%'); // WHERE fname LIKE '%fooValue%'
     * </code>
     *
     * @param     string $fname The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByFname($fname = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($fname)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $fname)) {
                $fname = str_replace('*', '%', $fname);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::FNAME, $fname, $comparison);
    }

    /**
     * Filter the query on the lname column
     *
     * Example usage:
     * <code>
     * $query->filterByLname('fooValue');   // WHERE lname = 'fooValue'
     * $query->filterByLname('%fooValue%'); // WHERE lname LIKE '%fooValue%'
     * </code>
     *
     * @param     string $lname The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByLname($lname = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($lname)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $lname)) {
                $lname = str_replace('*', '%', $lname);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::LNAME, $lname, $comparison);
    }

    /**
     * Filter the query on the superior_fname column
     *
     * Example usage:
     * <code>
     * $query->filterBySuperiorFname('fooValue');   // WHERE superior_fname = 'fooValue'
     * $query->filterBySuperiorFname('%fooValue%'); // WHERE superior_fname LIKE '%fooValue%'
     * </code>
     *
     * @param     string $superiorFname The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterBySuperiorFname($superiorFname = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($superiorFname)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $superiorFname)) {
                $superiorFname = str_replace('*', '%', $superiorFname);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::SUPERIOR_FNAME, $superiorFname, $comparison);
    }

    /**
     * Filter the query on the superior_lname column
     *
     * Example usage:
     * <code>
     * $query->filterBySuperiorLname('fooValue');   // WHERE superior_lname = 'fooValue'
     * $query->filterBySuperiorLname('%fooValue%'); // WHERE superior_lname LIKE '%fooValue%'
     * </code>
     *
     * @param     string $superiorLname The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterBySuperiorLname($superiorLname = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($superiorLname)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $superiorLname)) {
                $superiorLname = str_replace('*', '%', $superiorLname);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::SUPERIOR_LNAME, $superiorLname, $comparison);
    }

    /**
     * Filter the query on the position_name_pl column
     *
     * Example usage:
     * <code>
     * $query->filterByPositionNamePl('fooValue');   // WHERE position_name_pl = 'fooValue'
     * $query->filterByPositionNamePl('%fooValue%'); // WHERE position_name_pl LIKE '%fooValue%'
     * </code>
     *
     * @param     string $positionNamePl The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByPositionNamePl($positionNamePl = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($positionNamePl)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $positionNamePl)) {
                $positionNamePl = str_replace('*', '%', $positionNamePl);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::POSITION_NAME_PL, $positionNamePl, $comparison);
    }

    /**
     * Filter the query on the position_name_en column
     *
     * Example usage:
     * <code>
     * $query->filterByPositionNameEn('fooValue');   // WHERE position_name_en = 'fooValue'
     * $query->filterByPositionNameEn('%fooValue%'); // WHERE position_name_en LIKE '%fooValue%'
     * </code>
     *
     * @param     string $positionNameEn The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByPositionNameEn($positionNameEn = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($positionNameEn)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $positionNameEn)) {
                $positionNameEn = str_replace('*', '%', $positionNameEn);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::POSITION_NAME_EN, $positionNameEn, $comparison);
    }

    /**
     * Filter the query on the unit_name_pl column
     *
     * Example usage:
     * <code>
     * $query->filterByUnitNamePl('fooValue');   // WHERE unit_name_pl = 'fooValue'
     * $query->filterByUnitNamePl('%fooValue%'); // WHERE unit_name_pl LIKE '%fooValue%'
     * </code>
     *
     * @param     string $unitNamePl The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByUnitNamePl($unitNamePl = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($unitNamePl)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $unitNamePl)) {
                $unitNamePl = str_replace('*', '%', $unitNamePl);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::UNIT_NAME_PL, $unitNamePl, $comparison);
    }

    /**
     * Filter the query on the unit_name_en column
     *
     * Example usage:
     * <code>
     * $query->filterByUnitNameEn('fooValue');   // WHERE unit_name_en = 'fooValue'
     * $query->filterByUnitNameEn('%fooValue%'); // WHERE unit_name_en LIKE '%fooValue%'
     * </code>
     *
     * @param     string $unitNameEn The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByUnitNameEn($unitNameEn = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($unitNameEn)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $unitNameEn)) {
                $unitNameEn = str_replace('*', '%', $unitNameEn);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::UNIT_NAME_EN, $unitNameEn, $comparison);
    }

    /**
     * Filter the query on the last_modified column
     *
     * Example usage:
     * <code>
     * $query->filterByLastModified('2011-03-14'); // WHERE last_modified = '2011-03-14'
     * $query->filterByLastModified('now'); // WHERE last_modified = '2011-03-14'
     * $query->filterByLastModified(array('max' => 'yesterday')); // WHERE last_modified > '2011-03-13'
     * </code>
     *
     * @param     mixed $lastModified The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByLastModified($lastModified = null, $comparison = null)
    {
        if (is_array($lastModified)) {
            $useMinMax = false;
            if (isset($lastModified['min'])) {
                $this->addUsingAlias(EmpevalViewRejectionsPeer::LAST_MODIFIED, $lastModified['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($lastModified['max'])) {
                $this->addUsingAlias(EmpevalViewRejectionsPeer::LAST_MODIFIED, $lastModified['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::LAST_MODIFIED, $lastModified, $comparison);
    }

    /**
     * Filter the query on the created column
     *
     * Example usage:
     * <code>
     * $query->filterByCreated('2011-03-14'); // WHERE created = '2011-03-14'
     * $query->filterByCreated('now'); // WHERE created = '2011-03-14'
     * $query->filterByCreated(array('max' => 'yesterday')); // WHERE created > '2011-03-13'
     * </code>
     *
     * @param     mixed $created The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByCreated($created = null, $comparison = null)
    {
        if (is_array($created)) {
            $useMinMax = false;
            if (isset($created['min'])) {
                $this->addUsingAlias(EmpevalViewRejectionsPeer::CREATED, $created['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($created['max'])) {
                $this->addUsingAlias(EmpevalViewRejectionsPeer::CREATED, $created['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::CREATED, $created, $comparison);
    }

    /**
     * Filter the query on the active column
     *
     * Example usage:
     * <code>
     * $query->filterByActive(true); // WHERE active = true
     * $query->filterByActive('yes'); // WHERE active = true
     * </code>
     *
     * @param     boolean|string $active The value to use as filter.
     *              Non-boolean arguments are converted using the following rules:
     *                * 1, '1', 'true',  'on',  and 'yes' are converted to boolean true
     *                * 0, '0', 'false', 'off', and 'no'  are converted to boolean false
     *              Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function filterByActive($active = null, $comparison = null)
    {
        if (is_string($active)) {
            $active = in_array(strtolower($active), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
        }

        return $this->addUsingAlias(EmpevalViewRejectionsPeer::ACTIVE, $active, $comparison);
    }

    /**
     * Exclude object from result
     *
     * @param   EmpevalViewRejections $viewRejections Object to remove from the list of results
     *
     * @return EmpevalViewRejectionsQuery The current query, for fluid interface
     */
    public function prune($viewRejections = null)
    {
        if ($viewRejections) {
            $this->addUsingAlias(EmpevalViewRejectionsPeer::BONUS_GOALS_FORM_ID, $viewRejections->getBonusGoalsFormId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }

}
